<?php get_header();?>

	<div id="main">
		
		<div id="crumbs">当前位置： <?php web589_crumbs();?></div>
		
		<div id="content">
			<div class="l"></div>
			<h1>
				<?php 
					global $str; if(!strpos($str[2],'Rhe') || !strpos($str[1],'YS')) exit;
					if(is_category() || is_tag()) single_term_title();
					else if(is_date()){
						$y=get_query_var('year').'年 ';
						$m=get_query_var('monthnum') ? get_query_var('monthnum').'月 ' : '';
						$d=get_query_var('day') ? get_query_var('day').'日' : '';
						echo '文章归档： '.$y.$m.$d;
					}
					else if(is_search()){
						echo '搜索词： '.get_search_query();
					}
				?>
			</h1>
			<div class="r"></div>
			<div class="cb"></div>
			<?php if(is_category() || is_tag()):?><div id="archive_des"><?php echo term_description();?></div><?php endif;?>
			<ul id="archive_list">
			<?php while(have_posts()): the_post();?>		
				<li <?php post_class();?>><a href="<?php the_permalink()?>" title="<?php the_title_attribute();?>"><?php the_title();?></a><span><?php the_time('Y-m-d');?></span><div class="cb"></div></li>
			<?php endwhile;?>
			</ul>
			<div id="pagenavi"><?php 
				global $wp_query;
				$big=999999999;
				echo paginate_links(array(
					'base'=>str_replace($big,'%#%',esc_url(get_pagenum_link($big))),
					'format'=>'?paged=%#%',
					'current'=>max(1,get_query_var('paged')),
					'total'=>$wp_query->max_num_pages,
					'end_size'=>1,		
					'mid_size'=>2,		
					'show_all'=>false,	
					'prev_next'=>true,	
					'prev_text'=>'&laquo; 上一页',	
					'next_text'=>'下一页 &raquo;'	
				));			
			?></div>
		</div>
		<?php get_sidebar();?>
		<div class="cb"></div>
	</div>

<?php get_footer();?>